package tr3dtris.game.display;

import tr3dtris.game.models.pieces.AbstractPiece;

/**
 * Interface for the callbacks functions used in all AbstractDisplay classes.
 * @author Luciano Mammino <loige@hotmail.com>
 * @author Andrea Mangano <kapitan0@hotmail.it>
 * @version 0.1
 * @since 0.1
 */
public interface IDisplay
{

    /**
     * Function called from the <Game> class just after the connection of the
     * <AbstractDisplay> to a <Game> instance.
     */
    public abstract void configure();

    /**
     * Called when a graphic refresh is needed
     */
    public abstract void refresh();

    /**
     * Called when a new game starts
     */
    public abstract void gameStarted();

    /**
     * Called on game over
     */
    public abstract void gameOver();

    /**
     * Called when a piece collides
     * @param p reference to the <AbstractPiece> that collided
     */
    public abstract void pieceCollided(AbstractPiece p);

    /**
     * Called when a row is erased
     * @param i
     */
    public abstract void rowErased(int i);

}
